<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>:empty</title>
    <style>
        .div1 {
            width: 100px;
            height: 100px;
        }

        .div1:empty {
            border: 1px solid #ff0000;
        }
    </style>
</head>
<body>
    <h1>:empty选择器</h1>
    <ul>
        <li>empty选择器要求元素内容为空</li>
    </ul>

    <div class="div1"></div>
    <div class="div1">我内部不为空，为空的div会有红色边框</div>
</body>
</html>